<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8" contentType="text/html;charset=utf-8" %>
<%@ taglib uri="http://www.springframework.org/security/tags" prefix="security" %>
<%@ taglib uri="http://www.springmodules.org/tags/commons-validator" prefix="v" %>
<%@ taglib uri="http://www.springframework.org/tags" prefix="spring" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>
<%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
<%@ taglib uri="http://struts-menu.sf.net/tag-el" prefix="menu" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/decorator" prefix="decorator"%>
<%@ taglib uri="http://www.opensymphony.com/sitemesh/page" prefix="page"%>
<%@ taglib uri="http://www.appfuse.org/tags/spring" prefix="appfuse" %>

<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<c:set var="datePattern"><fmt:message key="date.format"/></c:set>

<head>
    <title><fmt:message key="first.login"/></title>
    <meta name="heading" content="<fmt:message key='first.login'/>"/>
    <meta name="menu" content="FirstLogin"/>
</head>
<div class="jquery_tab_container">
    <span class="heading_tab advanced_link active tab1"><fmt:message key="first.login"/></span>
</div>

<div class="jquery_tab">
    <div class="content_block"></div>
<form:form commandName="username" method="post" action="firstlogin" id="changePasswordForm" onsubmit="return validatePassword(this)">
<form:errors path="*" cssClass="error" element="div"/>
<form:hidden path="id"/>


<p>
    <fmt:message key="first.opisnaPoraka"/>
</p>
    <p>
        <appfuse:label styleClass="left width150" key="user.password"/>
        <form:input path="password" id="password" cssClass="input-medium left" cssErrorClass="input-medium left error" maxlength="1000"/>
        <form:errors path="password" cssClass="fieldError left"/>
        <br class="clearboth" />
    </p>
     <p>
        <appfuse:label styleClass="left width150" key="user.confirmPassword"/>
        <form:input path="confirmPassword" id="confirmPassword" cssClass="input-medium left" cssErrorClass="input-medium left error" maxlength="1000"/>
        <form:errors path="confirmPassword" cssClass="fieldError left"/>
        <br class="clearboth" />
    </p>
    
    <p class="buttonBar bottom">
        <input type="submit" class="button" name="save" value="<fmt:message key="button.save"/>"/>
        <%--    <c:if test="${not empty country.id}">
        <input type="submit" class="button" name="delete" onclick="bCancel=true;return confirmDelete('country')"
            value="<fmt:message key="button.delete"/>" />
        </c:if>--%>
        <!--
        <input type="submit" class="button" name="cancel" value="<fmt:message key="button.cancel"/>" onclick="bCancel=true"/>
        -->
        </p>

</form:form>
</div>

<script type="text/javascript" src="<c:url value='/scripts/validator.jsp'/>"></script>

<script type="text/javascript">
    Form.focusFirstElement($('changePasswordForm'));
</script>
